const employeeList = [
  {
    name: "张一",
    Id: "123"
  },
  {
    name: "张二",
    Id: "234"
  },
  {
    name: "张三",
    Id: "345"
  },
  {
    name: "张四",
    Id: "456"
  },
  {
    name: "张五",
    Id: "567"
  },
   {
    name: "张六",
    Id: "678"
  },
  {
    name: "张七",
    Id: "789"
  },
  {
    name: "张八",
    Id: "910"
  },
];

const employeeInfo={
    name: "李华",
    Id: "145678345",
    department: "财务部",
    position: "财务助理",
    phone: "13456789876",
    education: "硕士",
    hometown: "江西赣州",
    address: "福建省福州市滨溪花园小区1单元21层"
}

const updateEmoloyeeInfo = {
  msg: "修改成功",
  employeeInfo: {
    name: "李华",
    Id: "145678345",
    department: "财务部",
    position: "财务助理",
    phone: "13456789876",
    education: "硕士",
    hometown: "江西赣州",
    address: "福建省福州市滨溪花园小区1单元21层"
  }
};

const todos=[{
  title:"报表",
  content:"完成第一季度报表"
},{
  title:"入职",
  content:"办理入职"
},{
  title:"离职",
  content:"办理离职"
}]

const departments=["财务部","策划部","研发部","企划部","后勤部"]

const attendInfo={
  attend_rate:'90%',
  absent_count:'5次',
  late_count:'10次',
  overtime:'20次',
  business_trip:'30次',
  askLeave:'30次',
}

module.exports = [
  //获取员工列表
  {
    url: "/employee/getEmployeeList",
    type: "get",
    result: () => {
      return {
        code: 200,
        data: { employeeList }
      };
    }
  },
  //获取员工信息
  {
    url: "/employee/getEmployeeInfo",
    type: "get",
    result: () => {
      return {
        code: 200,
        data: { employeeInfo }
      };
    }
  },
  //修改员工信息
  {
    url: "/employee/updateEmployeeInfo",
    type: "post",
    result: () => {
      return {
        code: 200,
        data: updateEmoloyeeInfo
      };
    }
  },
  //员工待办
  {
    url: "/employee/todos",
    type: "get",
    result: () => {
      return {
        code: 200,
        data: { todos }
      };
    }
  },
  //获取所有部门
  {
    url: "/employee/departments",
    type: "get",
    result: () => {
      return {
        code: 200,
        data: { departments }
      };
    }
  },
  //信息录入提交
  {
    url: "/employee/inputInfo",
    type: "post",
    result: () => {
      return {
        code: 200,
        data: {
          msg: "信息录入成功"
        }
      };
    }
  },
  //设置待办事项
  {
    url: "/employee/setTodo",
    type: "post",
    result: () => {
      return {
        code: 200,
        data: {
          msg: "设置待办成功"
        }
      };
    }
  },
  //获取员工考勤基本信息(manager内simpleinfo页面)
  {
    url: "/employee/attend",
    type: "get",
    result: () => {
      return {
        code: 200,
        data: { attendInfo }
      };
    }
  }
];